package org.springblade.resource.feign;

import org.springblade.core.launch.constant.AppConstant;
import org.springblade.core.tool.api.R;
import org.springblade.resource.entity.Attach;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(
	value = AppConstant.APPLICATION_RESOURCE_NAME,
	fallback = IAttachClientFallback.class
)
public interface IAttachClient {
	String API_PREFIX = "/client";
	String ATTACH_LIST_GUID = API_PREFIX + "/attach-list-guid";
	String ATTACH_LIST_GUID_MODULE = API_PREFIX + "/attach-list-guid-module";
	/**
	 * 根据GUID获取附件信息
	 *
	 * @param guid   业务模块关联附件GUID
	 * @return R
	 */
	@GetMapping(ATTACH_LIST_GUID)
	R<List<Attach>> attachListGuid(@RequestParam("guid") String guid);

	@GetMapping(ATTACH_LIST_GUID_MODULE)
	R<Attach> attachListGuidAndModule(@RequestParam("guid") String guid, @RequestParam("module") String module);
}
